using System;

namespace MyWebPagesStarterKit.Sitemaps.Utilities
{
    internal static class EnumUtils
    {
        public static T Parse<T>(string enumMemberName) where T: struct
        {
            return Parse<T>(enumMemberName, false);
        }

        public static T Parse<T>(string enumMemberName, bool ignoreCase) where T: struct
        {
            return (T) Enum.Parse(typeof(T), enumMemberName, ignoreCase);
        }
    }
}
